package com.iodemo;

import java.io.*;

public class InputReaderTest {
    public static void main(String[] args) {
        InputStream is = null;
        InputStreamReader isr = null;

        try {
            is = new FileInputStream("/Users/edy/Desktop/file/1.txt");
            isr = new InputStreamReader(is);
            int len;
            char[] chars = new char[1024];
            while ((len = isr.read(chars)) > 0) {
                System.out.println(new String(chars,0,len));
            }

        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            IOUntilsDemo.close(isr);
            IOUntilsDemo.close(is);
        }
    }
}
